Codeblocks
  • 23 Sep 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Codeblocks

  • Dark
    Light

Article summary

Codeblocks are used in technical documentation to set off blocks of code or programming language from the rest of the text. They are used to clearly show examples of how to write code or to explain how a particular programming concept works.

Codeblocks are typically formatted differently from the rest of the text, using a monospaced font and syntax highlighting to make the code easier to read and understand. A copy option would be available to easily reuse it in the desired space.

Example:

def greet(name):
    print("Hello, " + name)
    
greet("John")

The syntax highlighting and monospaced font help readers understand the code.


Was this article helpful?

What's Next
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence